package com.heima.model.article.pojos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * APP已发布文章配置表
 * @TableName ap_article_config
 */
@ApiModel(description = "APP已发布文章配置表")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value ="ap_article_config")
public class ApArticleConfig {
    /**
     * 主键
     */
    @ApiModelProperty("主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 文章ID
     */
    @ApiModelProperty("文章ID")
    private Long articleId;

    /**
     * 是否可评论
     */
    @ApiModelProperty("是否可评论")
    private Integer isComment;

    /**
     * 是否转发
     */
    @ApiModelProperty("是否转发")
    private Integer isForward;

    /**
     * 是否下架
     */
    @ApiModelProperty("是否下架")
    private Integer isDown;

    /**
     * 是否已删除
     */
    @ApiModelProperty("是否已删除")
    private Integer isDelete;

    public ApArticleConfig(Long articleId) {
        this.articleId = articleId;
        this.isComment = 1;
        this.isForward = 1;
        this.isDown = 0;
        this.isDelete = 0;
    }
}